//页面加载

window.onload=function(){
	//获取元素对象
var trs=document.getElementsByTagName('tr');
for (var i=0;i<trs.length;i++) {
	var tds=trs[i].getElementsByTagName('td');
	for (var j=0;j<tds.length;j++) {
		if(i%2==0){
			tds[j].style.background=(j%2==0?'black':'white');
			
		}else{
			tds[j].style.background=(j%2==0?'white':'black');
		}
	}
}
}
